﻿namespace TestTool.Tests.Common.Trace
{
    using System;
    using System.Runtime.CompilerServices;
    using TestTool.HttpTransport.Interfaces;

    public class TrafficListener : ITrafficListener, ITransportController, IChannelController
    {
        public event Action<string> RequestSent;

        public event Action<string> ResponseReceived;

        public void LogRequest(string data)
        {
            if (this.RequestSent != null)
            {
                this.RequestSent(data);
            }
        }

        public void LogResponse(string data)
        {
            if (this.ResponseReceived != null)
            {
                this.ResponseReceived(data);
            }
        }
    }
}

